package tothreedesignmodel.memento;

import lombok.Data;

/**
 * @Author lzhphantom
 * @Description
 * @Date 创建于 10:02 2020/7/17
 * @Modified
 */
@Data
public class Originator {
    private String state;

    public Memento saveStateToMemento() {
        return new Memento(state);
    }

    public void getStateFromMemento(Memento memento) {
        state = memento.getState();
    }
}
